#pragma once

#include <cmath>

double f1(double x)
{
    return 1.0 / (1.0 + 25 * x * x);
}
double df1(double x)
{
    return -50.0 * x / (1.0 + 25 * x * x) / (1.0 + 25 * x * x);
}

double f2(double x)
{
    return 1.0 / (1.0 + x * x);
}
double df2(double x)
{
    return -2 * x / (1.0 + x * x) / (1.0 + x * x);
}

// x^2 +(3/2*y −sqrt(|x|))^2= 3的参数方程,x关于参数t的函数
double f_xt(double x)
{
    return sin(x);
}

// x^2 +(3/2*y −sqrt(|x|))^2= 3的参数方程,y关于参数t的函数
double f_yt(double x)
{
    return 2.0 / 3.0 * (cos(x) + sqrt(fabs(sin(x))));
}